/**
 *    Copyright 2010-2016 the original author or authors.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */
package org.springboot.jpetstore.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.springboot.jpetstore.domain.Account;

import java.util.List;
import java.util.Map;

/**
 * @author Eduardo Macarron
 *
 */
@Mapper
public interface AccountMapper {

  /**
   *
   * <save one>
   * @param account01
   * @return Long
   */
  int insert(Account account);
  /**
   *
   * <update one>
   * @param account01
   * @throws DAOException
   */
  int update(Account account);
  /**
   *
   * <find one by id>
   * @param id
   * @return Account
   */
  Account get(Long id);
  /**
   *
   * <delete one by id>
   * @param id
   * @return int
   */
  int delete(Long id);
  /**
   * <query all>
   * @param paramMap
   * @return List<Account>
   */
  public List<Account> search(Map paramMap);

  Account getAccountByUsername(String username);

  Account getAccountByUsernameAndPassword(String username, String password);

  void insertAccount(Account account);
  
  void insertProfile(Account account);
  
  void insertSignon(Account account);

  void updateAccount(Account account);

  void updateProfile(Account account);

  void updateSignon(Account account);



}
